|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| PicoServiceLocator.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 1 |
package org.marketchangers.pico;
|
|
| 2 |
|
|
| 3 |
import org.marketchangers.ServiceLocator;
|
|
| 4 |
import org.picocontainer.PicoContainer;
|
|
| 5 |
|
|
| 6 |
/**
|
|
| 7 |
* @author <a href="mailto:mtodd@wc-group.com">Matthew Todd</a>
|
|
| 8 |
*/
|
|
| 9 |
public class PicoServiceLocator implements ServiceLocator { |
|
| 10 |
private PicoContainer pico;
|
|
| 11 |
|
|
| 12 | 2 |
public PicoServiceLocator(PicoContainer pico) {
|
| 13 | 2 |
this.pico = pico;
|
| 14 |
} |
|
| 15 |
|
|
| 16 | 2 |
public Object get(Class key) {
|
| 17 | 2 |
return pico.getComponentInstanceOfType(key);
|
| 18 |
} |
|
| 19 |
} |
|
| 20 |
|
|
||||||||||